package com.ruoyi.mydevice.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户设备信息对象 user_device
 * 
 * @author ruoyi
 * @date 2025-01-14
 */
public class UserDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备ID */
    private Long deviceId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 设备类型 */
    @Excel(name = "设备类型")
    private String deviceType;

    /** 设备状态 */
    @Excel(name = "设备状态")
    private String deviceStatus;

    /** 最后同步时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后同步时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastSyncTime;

    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setDeviceType(String deviceType) 
    {
        this.deviceType = deviceType;
    }

    public String getDeviceType() 
    {
        return deviceType;
    }
    public void setDeviceStatus(String deviceStatus) 
    {
        this.deviceStatus = deviceStatus;
    }

    public String getDeviceStatus() 
    {
        return deviceStatus;
    }
    public void setLastSyncTime(Date lastSyncTime) 
    {
        this.lastSyncTime = lastSyncTime;
    }

    public Date getLastSyncTime() 
    {
        return lastSyncTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deviceId", getDeviceId())
            .append("userId", getUserId())
            .append("deviceName", getDeviceName())
            .append("deviceType", getDeviceType())
            .append("deviceStatus", getDeviceStatus())
            .append("lastSyncTime", getLastSyncTime())
            .toString();
    }
}
